const pidusage = require('pidusage');


function getPidUsage(processId: number) {
    return new Promise((resolve, reject) => {
        pidusage(processId, (err: any, stats: any) => {
            if (err) {
                reject(err);
            } else {
                resolve(stats);
            }
        });
    });
}


export default getPidUsage;